package study.newsql.tidb.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.eggs.result.Result;
import study.eggs.result.Results;

@Slf4j
@RestController
public class EchoController {

    @Autowired
    private UserBaseMapper userBaseMapper;

    @RequestMapping("/echo")
    public Result echo() {
        Page<UserBaseEO> page = userBaseMapper.getPageLt(1, 10);
        log.info(">>>>>> page= {}", page.getPages());
        return Results.ok();
    }
}
